import Vue from 'vue'
import Router from 'vue-router'
import HelloWorld from '@/components/HelloWorld'
import test from '@/components/test'
import test1 from '@/components/test1'
import index from '@/components/index'
import detail from '@/components/detail'
import register from '@/components/Register'
import login from '@/components/Login'
import upload from '@/components/Upload'
import AddCategory from '@/components/AddCategory'
import search from '@/components/search'
import myflow from '@/components/myflow'
import cart from "@/components/cart";
import order from '@/components/order'

import client from '@/components/client'
import admin from '@/components/admin'

Vue.use(Router)

var routes = [
  {
    path: "/HelloWorld",
    name: "HelloWorld",
    component: HelloWorld
  },
  {
    path: "/test",
    name: "test",
    component: test
  },
  {
    path: "/test1",
    name: "test1",
    component: test1
  },
  {
    path: "/",
    name: "index",
    component: index
  },
  {
    path: "/detail",
    name: "detail",
    component: detail
  },
  {
    path: "/register",
    name: "detregisterail",
    component: register
  },
  {
    path: "/login",
    name: "login",
    component: login
  },
  {
    path: "/upload",
    name: "upload",
    component: upload
  },
  {
    path: "/AddCategory",
    name: "AddCategory",
    component: AddCategory
  },
  {
    path: "/search",
    name: "search",
    component: search
  },
  {
    path: "/myflow",
    name: "myflow",
    component: myflow
  },
  {
    path: "/cart",
    name: "cart",
    component: cart
  },
  {
    path: "/order",
    name: "order",
    component: order
  },
  {
    path: "/client",
    name: "client",
    component: client
  },
  {
    path: "/admin",
    name: "admin",
    component: admin
  }
];

export default new Router({
  routes: routes,
  mode:'history' 
  
});
